package com.koron.sinoprobe.web.ledger.service;

import com.github.pagehelper.PageInfo;
import com.koron.bean.system.org.OrgBean;
import com.koron.sinoprobe.web.ledger.bean.entity.SpProject;
import com.koron.sinoprobe.web.ledger.bean.query.SpProjectQuery;
import com.koron.sinoprobe.web.ledger.bean.vo.KeyValue;
import com.koron.sinoprobe.web.ledger.bean.vo.ProjectOverviewStat;
import com.koron.sinoprobe.web.ledger.bean.vo.SpProjectVO;
import org.koron.ebs.mybatis.SessionFactory;

import java.util.List;
import java.util.Map;

/**
 * @author twcao
 * @title: SpProjectService
 * @projectName GDH_EAM_V2
 * @description: 专项项目service
 * @date 2021/12/111:59
 */
public interface SpProjectService {

    SpProject getById(SessionFactory factory, String projectId);

    SpProjectVO selectOne(SessionFactory factory, String projectId);

    List<SpProjectVO> queryList(SessionFactory factory, SpProjectQuery query);

    PageInfo<SpProjectVO> page(SessionFactory factory, SpProjectQuery query);

    SpProjectVO saveOrUpdate(SessionFactory factory, SpProjectVO detail);

    SpProject saveOrUpdate(SessionFactory factory, SpProject detail);

    Boolean saveOrUpdateBatch(SessionFactory factory, List<SpProject> projectList);

    Boolean deleteById(SessionFactory factory, String id);

    List<OrgBean> getProjectDept(SessionFactory factory);

    ProjectOverviewStat getProjectOverview(SessionFactory factory, Integer year, String hostDeptId);

    Map<String, List<KeyValue>> getProjectProgress(SessionFactory factory, Integer year, String hostDeptId);

    Integer getProjectRef(SessionFactory factory, String projectId, String projectAction);

    List<SpProjectVO> listProjectRef(SessionFactory factory, List<String> projectId, String projectAction);

    boolean deleteByPlanId(SessionFactory factory, String planId);

    boolean update(SessionFactory factory, SpProject spProject);
}
